package com.dachuang.canjiren.controller;


import com.dachuang.canjiren.service.BusinessService;
import com.dachuang.canjiren.service.FollowService;
import com.dachuang.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-07-27
 */
@RestController
@RequestMapping("/canjiren/follow")
public class FollowController {
    @Autowired
    private FollowService followService;

    @GetMapping("insertFollow")
    R insertFollow(
            @RequestParam(value = "userId",required = false) Integer userId,
            @RequestParam(value = "followId",required = false)Integer followId){
        return followService.insertFollow(userId,followId);
    }
    @GetMapping(value = "followList")
    R followList() {
        return followService.selectFollowList();
    }
}

